import QtQuick 2.0
import "colorMarker.js" as ColorMarker

Rectangle {
    width: 360; height: 240
    color: "#eeeeee"
    id: rootItem

    Rectangle{
        id: colorRect
        color: "red"
        width: 150; height: 130
        anchors.centerIn: parent
        MouseArea{
            id: mouseArea
            anchors.fill: parent
        }
        states: [
            State {
                name: "default"
                when: mouseArea.pressed
                StateChangeScript{
                    name: "changColor"
                    script: ColorMarker.changeColor(colorRect)
                }
            }
        ]
    }
}

